package com.TTBook.core.book.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class BookCriteria {
    protected String orderByClause;

    protected List oredCriteria;

    public BookCriteria() {
        oredCriteria = new ArrayList();
    }

    protected BookCriteria(BookCriteria example) {
        this.orderByClause = example.orderByClause;
        this.oredCriteria = example.oredCriteria;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public List getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ts_book
     *
     *  Wed Oct 16 00:08:38 CST 2013
     */
    public void clear() {
        oredCriteria.clear();
    }

    public static class Criteria {
        protected List criteriaWithoutValue;

        protected List criteriaWithSingleValue;

        protected List criteriaWithListValue;

        protected List criteriaWithBetweenValue;

        protected Criteria() {
            super();
            criteriaWithoutValue = new ArrayList();
            criteriaWithSingleValue = new ArrayList();
            criteriaWithListValue = new ArrayList();
            criteriaWithBetweenValue = new ArrayList();
        }

        public boolean isValid() {
            return criteriaWithoutValue.size() > 0
                || criteriaWithSingleValue.size() > 0
                || criteriaWithListValue.size() > 0
                || criteriaWithBetweenValue.size() > 0;
        }

        public List getCriteriaWithoutValue() {
            return criteriaWithoutValue;
        }

        public List getCriteriaWithSingleValue() {
            return criteriaWithSingleValue;
        }

        public List getCriteriaWithListValue() {
            return criteriaWithListValue;
        }

        public List getCriteriaWithBetweenValue() {
            return criteriaWithBetweenValue;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteriaWithoutValue.add(condition);
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            Map map = new HashMap();
            map.put("condition", condition);
            map.put("value", value);
            criteriaWithSingleValue.add(map);
        }

        protected void addCriterion(String condition, List values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            Map map = new HashMap();
            map.put("condition", condition);
            map.put("values", values);
            criteriaWithListValue.add(map);
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            List list = new ArrayList();
            list.add(value1);
            list.add(value2);
            Map map = new HashMap();
            map.put("condition", condition);
            map.put("values", list);
            criteriaWithBetweenValue.add(map);
        }

        public Criteria andBookidIsNull() {
            addCriterion("BOOKID is null");
            return this;
        }

        public Criteria andBookidIsNotNull() {
            addCriterion("BOOKID is not null");
            return this;
        }

        public Criteria andBookidEqualTo(String value) {
            addCriterion("BOOKID =", value, "bookid");
            return this;
        }

        public Criteria andBookidNotEqualTo(String value) {
            addCriterion("BOOKID <>", value, "bookid");
            return this;
        }

        public Criteria andBookidGreaterThan(String value) {
            addCriterion("BOOKID >", value, "bookid");
            return this;
        }

        public Criteria andBookidGreaterThanOrEqualTo(String value) {
            addCriterion("BOOKID >=", value, "bookid");
            return this;
        }

        public Criteria andBookidLessThan(String value) {
            addCriterion("BOOKID <", value, "bookid");
            return this;
        }

        public Criteria andBookidLessThanOrEqualTo(String value) {
            addCriterion("BOOKID <=", value, "bookid");
            return this;
        }

        public Criteria andBookidLike(String value) {
            addCriterion("BOOKID like", value, "bookid");
            return this;
        }

        public Criteria andBookidNotLike(String value) {
            addCriterion("BOOKID not like", value, "bookid");
            return this;
        }

        public Criteria andBookidIn(List values) {
            addCriterion("BOOKID in", values, "bookid");
            return this;
        }

        public Criteria andBookidNotIn(List values) {
            addCriterion("BOOKID not in", values, "bookid");
            return this;
        }

        public Criteria andBookidBetween(String value1, String value2) {
            addCriterion("BOOKID between", value1, value2, "bookid");
            return this;
        }

        public Criteria andBookidNotBetween(String value1, String value2) {
            addCriterion("BOOKID not between", value1, value2, "bookid");
            return this;
        }

        public Criteria andBookNameIsNull() {
            addCriterion("BOOK_NAME is null");
            return this;
        }

        public Criteria andBookNameIsNotNull() {
            addCriterion("BOOK_NAME is not null");
            return this;
        }

        public Criteria andBookNameEqualTo(String value) {
            addCriterion("BOOK_NAME =", value, "bookName");
            return this;
        }

        public Criteria andBookNameNotEqualTo(String value) {
            addCriterion("BOOK_NAME <>", value, "bookName");
            return this;
        }

        public Criteria andBookNameGreaterThan(String value) {
            addCriterion("BOOK_NAME >", value, "bookName");
            return this;
        }

        public Criteria andBookNameGreaterThanOrEqualTo(String value) {
            addCriterion("BOOK_NAME >=", value, "bookName");
            return this;
        }

        public Criteria andBookNameLessThan(String value) {
            addCriterion("BOOK_NAME <", value, "bookName");
            return this;
        }

        public Criteria andBookNameLessThanOrEqualTo(String value) {
            addCriterion("BOOK_NAME <=", value, "bookName");
            return this;
        }

        public Criteria andBookNameLike(String value) {
            addCriterion("BOOK_NAME like", value, "bookName");
            return this;
        }

        public Criteria andBookNameNotLike(String value) {
            addCriterion("BOOK_NAME not like", value, "bookName");
            return this;
        }

        public Criteria andBookNameIn(List values) {
            addCriterion("BOOK_NAME in", values, "bookName");
            return this;
        }

        public Criteria andBookNameNotIn(List values) {
            addCriterion("BOOK_NAME not in", values, "bookName");
            return this;
        }

        public Criteria andBookNameBetween(String value1, String value2) {
            addCriterion("BOOK_NAME between", value1, value2, "bookName");
            return this;
        }

        public Criteria andBookNameNotBetween(String value1, String value2) {
            addCriterion("BOOK_NAME not between", value1, value2, "bookName");
            return this;
        }

        public Criteria andBookOrgpriceIsNull() {
            addCriterion("BOOK_ORGPRICE is null");
            return this;
        }

        public Criteria andBookOrgpriceIsNotNull() {
            addCriterion("BOOK_ORGPRICE is not null");
            return this;
        }

        public Criteria andBookOrgpriceEqualTo(BigDecimal value) {
            addCriterion("BOOK_ORGPRICE =", value, "bookOrgprice");
            return this;
        }

        public Criteria andBookOrgpriceNotEqualTo(BigDecimal value) {
            addCriterion("BOOK_ORGPRICE <>", value, "bookOrgprice");
            return this;
        }

        public Criteria andBookOrgpriceGreaterThan(BigDecimal value) {
            addCriterion("BOOK_ORGPRICE >", value, "bookOrgprice");
            return this;
        }

        public Criteria andBookOrgpriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("BOOK_ORGPRICE >=", value, "bookOrgprice");
            return this;
        }

        public Criteria andBookOrgpriceLessThan(BigDecimal value) {
            addCriterion("BOOK_ORGPRICE <", value, "bookOrgprice");
            return this;
        }

        public Criteria andBookOrgpriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("BOOK_ORGPRICE <=", value, "bookOrgprice");
            return this;
        }

        public Criteria andBookOrgpriceIn(List values) {
            addCriterion("BOOK_ORGPRICE in", values, "bookOrgprice");
            return this;
        }

        public Criteria andBookOrgpriceNotIn(List values) {
            addCriterion("BOOK_ORGPRICE not in", values, "bookOrgprice");
            return this;
        }

        public Criteria andBookOrgpriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("BOOK_ORGPRICE between", value1, value2, "bookOrgprice");
            return this;
        }

        public Criteria andBookOrgpriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("BOOK_ORGPRICE not between", value1, value2, "bookOrgprice");
            return this;
        }

        public Criteria andBookMallPriceIsNull() {
            addCriterion("BOOK_MALL_PRICE is null");
            return this;
        }

        public Criteria andBookMallPriceIsNotNull() {
            addCriterion("BOOK_MALL_PRICE is not null");
            return this;
        }

        public Criteria andBookMallPriceEqualTo(BigDecimal value) {
            addCriterion("BOOK_MALL_PRICE =", value, "bookMallPrice");
            return this;
        }

        public Criteria andBookMallPriceNotEqualTo(BigDecimal value) {
            addCriterion("BOOK_MALL_PRICE <>", value, "bookMallPrice");
            return this;
        }

        public Criteria andBookMallPriceGreaterThan(BigDecimal value) {
            addCriterion("BOOK_MALL_PRICE >", value, "bookMallPrice");
            return this;
        }

        public Criteria andBookMallPriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("BOOK_MALL_PRICE >=", value, "bookMallPrice");
            return this;
        }

        public Criteria andBookMallPriceLessThan(BigDecimal value) {
            addCriterion("BOOK_MALL_PRICE <", value, "bookMallPrice");
            return this;
        }

        public Criteria andBookMallPriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("BOOK_MALL_PRICE <=", value, "bookMallPrice");
            return this;
        }

        public Criteria andBookMallPriceIn(List values) {
            addCriterion("BOOK_MALL_PRICE in", values, "bookMallPrice");
            return this;
        }

        public Criteria andBookMallPriceNotIn(List values) {
            addCriterion("BOOK_MALL_PRICE not in", values, "bookMallPrice");
            return this;
        }

        public Criteria andBookMallPriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("BOOK_MALL_PRICE between", value1, value2, "bookMallPrice");
            return this;
        }

        public Criteria andBookMallPriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("BOOK_MALL_PRICE not between", value1, value2, "bookMallPrice");
            return this;
        }

        public Criteria andBookCatIdIsNull() {
            addCriterion("BOOK_CAT_ID is null");
            return this;
        }

        public Criteria andBookCatIdIsNotNull() {
            addCriterion("BOOK_CAT_ID is not null");
            return this;
        }

        public Criteria andBookCatIdEqualTo(String value) {
            addCriterion("BOOK_CAT_ID =", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdNotEqualTo(String value) {
            addCriterion("BOOK_CAT_ID <>", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdGreaterThan(String value) {
            addCriterion("BOOK_CAT_ID >", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdGreaterThanOrEqualTo(String value) {
            addCriterion("BOOK_CAT_ID >=", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdLessThan(String value) {
            addCriterion("BOOK_CAT_ID <", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdLessThanOrEqualTo(String value) {
            addCriterion("BOOK_CAT_ID <=", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdLike(String value) {
            addCriterion("BOOK_CAT_ID like", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdNotLike(String value) {
            addCriterion("BOOK_CAT_ID not like", value, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdIn(List values) {
            addCriterion("BOOK_CAT_ID in", values, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdNotIn(List values) {
            addCriterion("BOOK_CAT_ID not in", values, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdBetween(String value1, String value2) {
            addCriterion("BOOK_CAT_ID between", value1, value2, "bookCatId");
            return this;
        }

        public Criteria andBookCatIdNotBetween(String value1, String value2) {
            addCriterion("BOOK_CAT_ID not between", value1, value2, "bookCatId");
            return this;
        }

        public Criteria andMerchantBookIdIsNull() {
            addCriterion("MERCHANT_BOOK_ID is null");
            return this;
        }

        public Criteria andMerchantBookIdIsNotNull() {
            addCriterion("MERCHANT_BOOK_ID is not null");
            return this;
        }

        public Criteria andMerchantBookIdEqualTo(String value) {
            addCriterion("MERCHANT_BOOK_ID =", value, "merchantBookId");
            return this;
        }

        public Criteria andMerchantBookIdNotEqualTo(String value) {
            addCriterion("MERCHANT_BOOK_ID <>", value, "merchantBookId");
            return this;
        }

        public Criteria andMerchantBookIdGreaterThan(String value) {
            addCriterion("MERCHANT_BOOK_ID >", value, "merchantBookId");
            return this;
        }

        public Criteria andMerchantBookIdGreaterThanOrEqualTo(String value) {
            addCriterion("MERCHANT_BOOK_ID >=", value, "merchantBookId");
            return this;
        }

        public Criteria andMerchantBookIdLessThan(String value) {
            addCriterion("MERCHANT_BOOK_ID <", value, "merchantBookId");
            return this;
        }

        public Criteria andMerchantBookIdLessThanOrEqualTo(String value) {
            addCriterion("MERCHANT_BOOK_ID <=", value, "merchantBookId");
            return this;
        }

        public Criteria andMerchantBookIdLike(String value) {
            addCriterion("MERCHANT_BOOK_ID like", value, "merchantBookId");
            return this;
        }

        public Criteria andMerchantBookIdNotLike(String value) {
            addCriterion("MERCHANT_BOOK_ID not like", value, "merchantBookId");
            return this;
        }

        public Criteria andMerchantBookIdIn(List values) {
            addCriterion("MERCHANT_BOOK_ID in", values, "merchantBookId");
            return this;
        }

        public Criteria andMerchantBookIdNotIn(List values) {
            addCriterion("MERCHANT_BOOK_ID not in", values, "merchantBookId");
            return this;
        }

        public Criteria andMerchantBookIdBetween(String value1, String value2) {
            addCriterion("MERCHANT_BOOK_ID between", value1, value2, "merchantBookId");
            return this;
        }

        public Criteria andMerchantBookIdNotBetween(String value1, String value2) {
            addCriterion("MERCHANT_BOOK_ID not between", value1, value2, "merchantBookId");
            return this;
        }

        public Criteria andModifyTimeIsNull() {
            addCriterion("MODIFY_TIME is null");
            return this;
        }

        public Criteria andModifyTimeIsNotNull() {
            addCriterion("MODIFY_TIME is not null");
            return this;
        }

        public Criteria andModifyTimeEqualTo(Date value) {
            addCriterion("MODIFY_TIME =", value, "modifyTime");
            return this;
        }

        public Criteria andModifyTimeNotEqualTo(Date value) {
            addCriterion("MODIFY_TIME <>", value, "modifyTime");
            return this;
        }

        public Criteria andModifyTimeGreaterThan(Date value) {
            addCriterion("MODIFY_TIME >", value, "modifyTime");
            return this;
        }

        public Criteria andModifyTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("MODIFY_TIME >=", value, "modifyTime");
            return this;
        }

        public Criteria andModifyTimeLessThan(Date value) {
            addCriterion("MODIFY_TIME <", value, "modifyTime");
            return this;
        }

        public Criteria andModifyTimeLessThanOrEqualTo(Date value) {
            addCriterion("MODIFY_TIME <=", value, "modifyTime");
            return this;
        }

        public Criteria andModifyTimeIn(List values) {
            addCriterion("MODIFY_TIME in", values, "modifyTime");
            return this;
        }

        public Criteria andModifyTimeNotIn(List values) {
            addCriterion("MODIFY_TIME not in", values, "modifyTime");
            return this;
        }

        public Criteria andModifyTimeBetween(Date value1, Date value2) {
            addCriterion("MODIFY_TIME between", value1, value2, "modifyTime");
            return this;
        }

        public Criteria andModifyTimeNotBetween(Date value1, Date value2) {
            addCriterion("MODIFY_TIME not between", value1, value2, "modifyTime");
            return this;
        }

        public Criteria andTypeIsNull() {
            addCriterion("TYPE is null");
            return this;
        }

        public Criteria andTypeIsNotNull() {
            addCriterion("TYPE is not null");
            return this;
        }

        public Criteria andTypeEqualTo(String value) {
            addCriterion("TYPE =", value, "type");
            return this;
        }

        public Criteria andTypeNotEqualTo(String value) {
            addCriterion("TYPE <>", value, "type");
            return this;
        }

        public Criteria andTypeGreaterThan(String value) {
            addCriterion("TYPE >", value, "type");
            return this;
        }

        public Criteria andTypeGreaterThanOrEqualTo(String value) {
            addCriterion("TYPE >=", value, "type");
            return this;
        }

        public Criteria andTypeLessThan(String value) {
            addCriterion("TYPE <", value, "type");
            return this;
        }

        public Criteria andTypeLessThanOrEqualTo(String value) {
            addCriterion("TYPE <=", value, "type");
            return this;
        }

        public Criteria andTypeLike(String value) {
            addCriterion("TYPE like", value, "type");
            return this;
        }

        public Criteria andTypeNotLike(String value) {
            addCriterion("TYPE not like", value, "type");
            return this;
        }

        public Criteria andTypeIn(List values) {
            addCriterion("TYPE in", values, "type");
            return this;
        }

        public Criteria andTypeNotIn(List values) {
            addCriterion("TYPE not in", values, "type");
            return this;
        }

        public Criteria andTypeBetween(String value1, String value2) {
            addCriterion("TYPE between", value1, value2, "type");
            return this;
        }

        public Criteria andTypeNotBetween(String value1, String value2) {
            addCriterion("TYPE not between", value1, value2, "type");
            return this;
        }

        public Criteria andBookInfoIdIsNull() {
            addCriterion("BOOK_INFO_ID is null");
            return this;
        }

        public Criteria andBookInfoIdIsNotNull() {
            addCriterion("BOOK_INFO_ID is not null");
            return this;
        }

        public Criteria andBookInfoIdEqualTo(String value) {
            addCriterion("BOOK_INFO_ID =", value, "bookInfoId");
            return this;
        }

        public Criteria andBookInfoIdNotEqualTo(String value) {
            addCriterion("BOOK_INFO_ID <>", value, "bookInfoId");
            return this;
        }

        public Criteria andBookInfoIdGreaterThan(String value) {
            addCriterion("BOOK_INFO_ID >", value, "bookInfoId");
            return this;
        }

        public Criteria andBookInfoIdGreaterThanOrEqualTo(String value) {
            addCriterion("BOOK_INFO_ID >=", value, "bookInfoId");
            return this;
        }

        public Criteria andBookInfoIdLessThan(String value) {
            addCriterion("BOOK_INFO_ID <", value, "bookInfoId");
            return this;
        }

        public Criteria andBookInfoIdLessThanOrEqualTo(String value) {
            addCriterion("BOOK_INFO_ID <=", value, "bookInfoId");
            return this;
        }

        public Criteria andBookInfoIdLike(String value) {
            addCriterion("BOOK_INFO_ID like", value, "bookInfoId");
            return this;
        }

        public Criteria andBookInfoIdNotLike(String value) {
            addCriterion("BOOK_INFO_ID not like", value, "bookInfoId");
            return this;
        }

        public Criteria andBookInfoIdIn(List values) {
            addCriterion("BOOK_INFO_ID in", values, "bookInfoId");
            return this;
        }

        public Criteria andBookInfoIdNotIn(List values) {
            addCriterion("BOOK_INFO_ID not in", values, "bookInfoId");
            return this;
        }

        public Criteria andBookInfoIdBetween(String value1, String value2) {
            addCriterion("BOOK_INFO_ID between", value1, value2, "bookInfoId");
            return this;
        }

        public Criteria andBookInfoIdNotBetween(String value1, String value2) {
            addCriterion("BOOK_INFO_ID not between", value1, value2, "bookInfoId");
            return this;
        }
    }
}